<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// Route::rule('路由表达式','路由地址','请求类型','路由参数（数组）','变量规则（数组）');
Route::rule('home','index/index/index');
//Route::get('logs/:year/:mouth','index/index/years',['method'=>'get'],['year'=>'\d+$','mouth'=>'\d+$']);
//Route::get('logs/:id','index/index/user',['method'=>'get'],['id'=>'\d+']);
Route::get('logs/:name','index/index/names',['method'=>'get'],['name'=>'\w+']);
Route::get('url','index/index/url');

//资源控制器的路由,会自动生成7个RESTful模式的路由
Route::resource('index/index','index/Index');
// Route::resource('admin/admin','admin/Admin');
// Route::resource('admin/role','admin/Role');
// Route::resource('admin/access','admin/Access');
Route::get('editStatus/:id','admin/User/editStatus');
Route::get('search/:content','index/Index/search');



return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],
];
